﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Net;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
using CMS6Tools.Common;

namespace CMS6Tools.Performances.DataAnalytics
{
    static class Program
    {
        /// <summary>
        /// The main entry point for the application.
        /// </summary>
        [STAThread]
        static void Main()
        {
            Application.EnableVisualStyles();
            Application.SetCompatibleTextRenderingDefault(false);

            //var pingdomApiClient = new PingdomApiClient();
            //var stringBuilder = new StringBuilder();
            //var allProbes = pingdomApiClient.GetProbes();
            //var probesStr = allProbes.Where(c => c.CountryIso.Equals(PingdomApiClient.USCountryISO, StringComparison.InvariantCultureIgnoreCase)
            //                               || c.CountryIso.Equals(PingdomApiClient.CanadaCountryISO, StringComparison.InvariantCultureIgnoreCase))
            //                        .Select(c => c.ID)
            //                        .Aggregate("", (seed, next) => string.Format("{0},{1}", seed, next))
            //                        .Trim(',');
            //var checks = pingdomApiClient.GetAllChecks();
            //var to = DateTime.Now;
            //var from = to.AddDays(-7);
            //foreach (var check in checks)
            //{
            //    var response = pingdomApiClient.GetSummaryPerformance(check.ID, probesStr, from, to);
            //    response.Name = check.Name;
            //    //stringBuilder.AppendLine(response);
            //}
            //Application.Run(new PrtgAnalyticsForm());
            Application.Run(new MainForm());
        }
    }
}
